# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=dumb0
pkgver=19.1493e74
pkgrel=6
groups=('blackarch' 'blackarch-automation' 'blackarch-webapp')
pkgdesc='A simple tool to dump users in popular forums and CMS.'
arch=('any')
url='https://github.com/0verl0ad/Dumb0'
license=('GPL2')
depends=('perl' 'perl-libwww')
makedepends=('git')
source=("$pkgname::git+https://github.com/0verl0ad/Dumb0")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

prepare() {
  cd $pkgname

  sed -i '1i\#!/usr/bin/perl' Dumb0.pl
}

package() {
  cd $pkgname

  install -Dm 755 Dumb0.pl "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

